int alternateDigitSum(int n) {
	int sum = 0;
	int flag = 1;
	while (n) {
		sum += flag * (n % 10);
		flag = -flag;
		n /= 10;
	}
	return -flag * sum;
}